﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/UserUI/User.Master" AutoEventWireup="true"
    CodeBehind="RackEntry.aspx.cs" Inherits="BoutiquePOS.UI.UserUI.RackEntry" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Styles/UserUI/DivStyle.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/UserUI/RackCss.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/UserUI/GridView.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
        function check() {
            if (document.getElementById('<% = rackIdTextBox.ClientID %>').value == "") {
                alert("Enter a cabin no.");
            }
            var agree = confirm("Are you sure you want to delete this Information?");
            if (agree)
                return true;
            else
                return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset>
        <div>
            <p id="messageResult" runat="server">
            </p>
        </div>
        <table class="">
            <tr>
                <td>
                    Rack Id
                </td>
                <td>
                    <input type="text" id="rackIdTextBox" runat="server" class="textBoxDesign" />
                </td>
            </tr>
            <tr>
                <td>
                    Rack Name
                </td>
                <td>
                    <input type="text" id="rackNameTextBox" runat="server" required="" class="textBoxDesign" />
                </td>
            </tr>
        </table>
        <div>
            <input type="submit" value="Save" id="saveButton" runat="server" onserverclick="SaveCompany"
                class="button" onclick="javascript:return validation()" />&nbsp;
            <input type="button" value="Clear" id="clearButton" runat="server" onserverclick="ClearButton"
                class="button" />&nbsp;
            <input type="button" value="Close" id="closeButton" runat="server" onserverclick="CloseButton"
                class="button" />&nbsp;
            <input type="button" value="Delete" id="deleteButton" runat="server" onserverclick="DeleteButton"
                class="button" onclick="javascript:return check()" />
        </div>
    </fieldset>
    <fieldset>
        <legend>||Show Rack Info||</legend>
        <div>
            <input id="searchIdTextBox" type="text" runat="server" class="textBoxDesign" />
            <input id="searchByIdButton" type="button" value="Search By ID" class="button" runat="server"
                onserverclick="searchByIdButton_Click" />
            <input id="searchNameTextBox" type="text" runat="server" class="textBoxDesign" />
            <input id="searchByNameButton" type="button" value="Search By Name" class="button"
                runat="server" onserverclick="searchByNameButton_Click" />
        </div>
        <br />
        <div>
            <asp:GridView ID="rackGridView" runat="server" CellPadding="3" AllowPaging="True"
                AutoGenerateColumns="False" Height="100px" BackColor="White" BorderColor="#CCCCCC"
                BorderStyle="None" BorderWidth="1px"  OnPageIndexChanging="rackGridView_PageIndexChanging"
                PageSize="7" CssClass="gridRack">
                <FooterStyle CssClass="GridViewFooterStyle" />
                <RowStyle ForeColor="#000066" />
                <PagerStyle CssClass="GridViewFooterStyle" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                <HeaderStyle CssClass="GridViewHeaderStyle" Font-Bold="True" />
                <Columns>
                    <asp:BoundField DataField="RackId" HeaderText="Rack Id" Visible="False"/>
                    <asp:BoundField DataField="RackName" HeaderText="Rack Name" />
                    <asp:CommandField ShowSelectButton="True" />
                </Columns>
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#00547E" />
            </asp:GridView>
        </div>
    </fieldset>
</asp:Content>
